﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace Ocean.His.MedicalInsurance
{
    [DataContract]
    public class SI3202Data
    {
        /// <summary>
        /// 结算经办机构
        /// </summary>
        [DataMember(Name = "setl_optins")]
        public string SetlOptins { get; set; }

        /// <summary>
        /// 文件查询号
        /// </summary>
        [DataMember(Name = "file_qury_no")]
        public string FileQuryNo { get; set; }

        /// <summary>
        /// 对账开始日期
        /// </summary>
        [DataMember(Name = "stmt_begndate")]
        public string StmtBegndate { get; set; }

        /// <summary>
        /// 对账结束日期
        /// </summary>
        [DataMember(Name = "stmt_enddate")]
        public string StmtEnddate { get; set; }

        /// <summary>
        /// 医疗费总额
        /// </summary>
        [DataMember(Name = "medfee_sumamt")]
        public decimal MedfeeSumamt { get; set; }

        /// <summary>
        /// 基金支付总额
        /// </summary>
        [DataMember(Name = "fund_pay_sumamt")]
        public decimal FundPaySumamt { get; set; }

        /// <summary>
        /// 现金支付金额
        /// </summary>
        [DataMember(Name = "cash_payamt")]
        public string CashPayamt { get; set; }

        /// <summary>
        /// 定点医药机构结算笔数
        /// </summary>
        [DataMember(Name = "fixmedins_setl_cnt")]
        public int FixmedinsSetlCnt { get; set; }

        /// <summary>
        /// 清算类别
        /// </summary>
        [DataMember(Name = "clr_type")]
        public string ClrType { get; set; }

        /// <summary>
        /// 退费结算标志
        /// </summary>
        [DataMember(Name = "refd_setl_flag")]
        public string RefdSetlFlag { get; set; }
    }

    [DataContract]
    public class SI3202InputModel
    {
        [DataMember(Name = "data")]
        public SI3202Data Data { get; set; }
    }

    [DataContract]
    public class SI3202RequestModel : SIBaseRequestModel
    {
        /// <summary>
        /// 交易输入
        /// </summary>
        [DataMember(Name = "input")]
        public SI3202InputModel Input { get; set; }

        public SI3202RequestModel(MedicalInsuranceOption medicalInsuranceOption) : base(medicalInsuranceOption)
        {
            Infno = "3202";
        }
    }

    /// <summary>
    /// 医药机构费用结算对明细账
    /// </summary>
    [DataContract]
    public class SI3202FileContentModel
    {
        /// <summary>
        /// 结算ID
        /// </summary>
        [DataMember(Name = "setl_id")]
        public string SetlId { get; set; }

        /// <summary>
        /// 就诊ID
        /// </summary>
        [DataMember(Name = "mdtrt_id")]
        public string MdtrtId { get; set; }

        /// <summary>
        /// 人员编号
        /// </summary>
        [DataMember(Name = "psn_no")]
        public string PsnNo { get; set; }

        /// <summary>
        /// 医疗费总额
        /// </summary>
        [DataMember(Name = "medfee_sumamt")]
        public decimal MedfeeSumamt { get; set; }

        /// <summary>
        /// 基金支付总额
        /// </summary>
        [DataMember(Name = "fund_pay_sumamt")]
        public decimal FundPaySumamt { get; set; }

        /// <summary>
        /// 个人账户支出
        /// </summary>
        [DataMember(Name = "acct_pay")]
        public decimal AcctPay { get; set; }

        /// <summary>
        /// 退费结算标志
        /// </summary>
        [DataMember(Name = "refd_setl_flag")]
        public string RefdSetlFlag { get; set; }
    }
}
